.class Lcom/example/m6wmr/ChangeUserNameActivity$1;
.super Landroid/os/Handler;
.source "ChangeUserNameActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ChangeUserNameActivity;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ChangeUserNameActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ChangeUserNameActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    .line 70
    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 6
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 74
    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    .line 76
    iget v3, p1, Landroid/os/Message;->what:I

    packed-switch v3, :pswitch_data_0

    .line 113
    :goto_0
    return-void

    .line 81
    :pswitch_0
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    iget-object v3, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    # getter for: Lcom/example/m6wmr/ChangeUserNameActivity;->gethttpString:Ljava/lang/String;
    invoke-static {v3}, Lcom/example/m6wmr/ChangeUserNameActivity;->access$2(Lcom/example/m6wmr/ChangeUserNameActivity;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v1, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 82
    .local v1, "jsonObject":Lorg/json/JSONObject;
    const-string v3, "error"

    invoke-virtual {v1, v3}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    const-string v4, "true"

    invoke-virtual {v3, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 83
    iget-object v3, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    # getter for: Lcom/example/m6wmr/ChangeUserNameActivity;->context:Landroid/content/Context;
    invoke-static {v3}, Lcom/example/m6wmr/ChangeUserNameActivity;->access$3(Lcom/example/m6wmr/ChangeUserNameActivity;)Landroid/content/Context;

    move-result-object v3

    const-string v4, "\u63d0\u793a\u4fe1\u606f"

    const-string v5, "msg"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-static {v3, v4, v5}, Lmyapp/Util;->alertdialog(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 98
    .end local v1    # "jsonObject":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 100
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_0

    .line 87
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v1    # "jsonObject":Lorg/json/JSONObject;
    :cond_0
    :try_start_1
    const-string v3, "msg"

    invoke-virtual {v1, v3}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 88
    iget-object v3, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    # getter for: Lcom/example/m6wmr/ChangeUserNameActivity;->context:Landroid/content/Context;
    invoke-static {v3}, Lcom/example/m6wmr/ChangeUserNameActivity;->access$3(Lcom/example/m6wmr/ChangeUserNameActivity;)Landroid/content/Context;

    move-result-object v3

    const-string v4, "\u63d0\u793a\u4fe1\u606f"

    const-string v5, "\u8fd4\u56de\u6570\u636e\u4e3a\u7a7a"

    invoke-static {v3, v4, v5}, Lmyapp/Util;->alertdialog(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 92
    :cond_1
    iget-object v3, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    const-string v4, "userInfo"

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5}, Lcom/example/m6wmr/ChangeUserNameActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 93
    .local v2, "sharedPreferences":Landroid/content/SharedPreferences;
    invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    const-string v4, "username"

    iget-object v5, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    # getter for: Lcom/example/m6wmr/ChangeUserNameActivity;->new_username:Ljava/lang/String;
    invoke-static {v5}, Lcom/example/m6wmr/ChangeUserNameActivity;->access$4(Lcom/example/m6wmr/ChangeUserNameActivity;)Ljava/lang/String;

    move-result-object v5

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 94
    iget-object v3, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    # getter for: Lcom/example/m6wmr/ChangeUserNameActivity;->context:Landroid/content/Context;
    invoke-static {v3}, Lcom/example/m6wmr/ChangeUserNameActivity;->access$3(Lcom/example/m6wmr/ChangeUserNameActivity;)Landroid/content/Context;

    move-result-object v3

    const-string v4, "\u63d0\u793a\u4fe1\u606f"

    const-string v5, "\u4fee\u6539\u6210\u529f"

    invoke-static {v3, v4, v5}, Lmyapp/Util;->alertdialog(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 96
    iget-object v3, p0, Lcom/example/m6wmr/ChangeUserNameActivity$1;->this$0:Lcom/example/m6wmr/ChangeUserNameActivity;

    invoke-virtual {v3}, Lcom/example/m6wmr/ChangeUserNameActivity;->finish()V
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 76
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
    .end packed-switch
.end method
